home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Skunkware 5
/
Skunkware 5.iso
/
src
/
X11
/
xarchie-2.0.9
/
Makefile.dst
< prev
next >
Wrap
Makefile
|
1995-06-18
|
7KB
|
203 lines
#
# Default Makefile for xarchie : X11 Browser interface to Archie
#
# George Ferguson, ferguson@cs.rochester.edu, 23 Apr 1993.
#
# This Makefile is for use if you don't have imake/xmkmf. I don't
# expect it to be very helpful, since you'll have to know something
# about your X setup to use it. But here it is anyway. See the file
# INSTALL for instructions.
#
# Some useful definitions, adjust as needed:
CC = cc
RM = rm -f
INSTALL = install -c
INSTPGMFLAGS = -m 755
INSTAPPFLAGS = -m 644
INSTMANFLAGS = -m 644
# X-specific definitions:
XINCS = -I/usr/staff/include
XLIBS = -L/usr/staff/lib -lXaw -lXmu -lXt -lXext -lX11
XAPPLOADDIR = /usr/staff/lib/X11/app-defaults
# Where do you want this stuff? Uncomment and adjust these to change the
# destinations of "make install" and "make install.man".
BINDIR = /usr/staff/bin
LIBDIR = /usr/staff/lib
MANDIR = /usr/staff/man/man1
MANSUFFIX = 1
# Where is the app-defaults to C converter?
# Only needed if you change the app-defaults file Xarchie.ad and want the
# changes compiled into the program. If you don't have ad2c you should
# remove the extra clean target for Xarchie.ad.h below. If you lose
# Xarchie.ad.h and can't remake it, create it to be an empty file. Of course
# then you'll have to be able to find the resource file at run time.
# If your ad2c came from this xarchie distribution, then use the following
# target, otherwise change it to reflect where you put ad2c.
AD2C = Ad2c/ad2c.script
# How excited are you about debugging? This can be -g, -O, or nothing.
CDEBUGFLAGS = -g
# If the help strings make your executable too large, disable the
# online help by commenting out the following lines.
HELP = -DHELP
HELPC = help.c
HELPO = help.o
# To enable Prospero tracing (controlled by the -debug option), uncomment this
#PDEBUG = -DDEBUG
# Does your system have re_comp() and re_exec(), or regcmp() and regex()
# [in the case of A/UX]? If not, uncomment the following definitions.
# -> See HAVE_RE_COMP and HAVE_REGCMP in config.h.
#REGEXC = regex.c
#REGEXO = regex.o
# If you don't have <sys/param.h> to define MAXPATHLEN, then uncomment
# and adjust the following definition.
# -> See HAVE_SYS_PARAM_H in config.h.
#MAXPATHLEN = -DMAXPATHLEN=256
# If you don't have strcasecmp() and strncasecmp(), uncomment the
# following definitions:
# -> See HAVE_STRCASECMP in config.h
#STRCASECMP = -DSTRCASECMP
#STRCASECMPC = strcasecmp.c
#STRCASECMPO = strcasecmp.o
# If your system does not use DNS hostname lookup by default, you
# need to uncomment the following definition. This will be apparent
# if the program builds but gives the error: "Can't resolve hostname".
# You can test this by building and running resolv.c.
# -> See NEED_LRESOLV in config.h.
#RESOLV_LIB = -lresolv
# You can enable the use of a FileChooser widget for dialogs that
# require a filename (Save, Load, Write, etc). If your system has
# trouble with the subclassing of widgets for the FileChooser
# class or with the device-independent directory routines in FWF/Dir,
# you should comment out these definitions.
# Note: You will also have to delete or comment out the targets for
# $(FCHOOSER_DEP), etc., below, marked with a comment to that effect.
FCHOOSER_DEF = -DFILECHOOSER
FCHOOSER_DIR = FWF/FileChooser
FCHOOSER_INC = -I$(FCHOOSER_DIR)
FCHOOSER_LIB = -L$(FCHOOSER_DIR) -lFChooser
FCHOOSER_DEP = $(FCHOOSER_DIR)/libFChooser.a
DIR_DIR = FWF/Dir
DIR_INC = -I$(DIR_DIR)
DIR_LIB = -L$(DIR_DIR) -lDir
DIR_DEP = $(DIR_DIR)/libDir.a
FCHOOSER_DIRS = $(FCHOOSER_DIR) $(DIR_DIR)
FCHOOSER_INCS = $(FCHOOSER_INC) $(DIR_INC)
FCHOOSER_LIBS = $(FCHOOSER_LIB) $(DIR_LIB)
FCHOOSER_DEPS = $(FCHOOSER_DEP) $(DIR_DEP)
# You want to use the MultiList widget if possible. If you have problems
# with the subclassing in your version of X, you can use the regular
# Athena List widget by commenting out these definitions. Of course then
# you will not be able to make multiple selections.
# Note: You will also have to delete or comment out the target for
# $(MULTILIST_DEP), below, marked with a comment to that effect.
MULTILIST_DEF = -DMULTILIST
MULTILIST_DIR = FWF/MultiList
MULTILIST_INC = -I$(MULTILIST_DIR)
MULTILIST_LIB = -L$(MULTILIST_DIR) -lMultiList
MULTILIST_DEP = $(MULTILIST_DIR)/libMultiList.a
##############################################################################
# Nothing to change below here...
POBJS = atalloc.o dirsend.o get_pauth.o get_vdir.o perrmesg.o ptalloc.o \
$(REGEXO) stcopy.o support.o vl_comp.o vlalloc.o
COBJS = query.o browser.o db.o selection.o status.o saveload.o \
inet_ntoa.o hostname.o username.o \
weight.o ftp.o syserr.o $(STRCASECMPO)
XOBJS = xarchie.o display-x.o actions.o ftp-actions.o types.o \
settings.o file-panel.o view-file.o about.o $(HELPO) \
menu.o m-file.o m-query.o m-settings.o m-file-panel.o \
fchooser.o popups.o alert.o confirm.o syntax.o xutil.o tilde.o
OBJS = $(POBJS) $(COBJS) $(XOBJS)
DEFINES = -DARCHIE -DXARCHIE -DX11 $(MAXPATHLEN) $(STRCASECMP) \
$(HELP) $(FCHOOSER_DEF) $(MULTILIST_DEF)
INCLUDES= -I. $(FCHOOSER_INCS) $(MULTILIST_INC)
LIBS = $(FCHOOSER_LIBS) $(MULTILIST_LIB) $(XLIBS) $(RESOLV_LIB)
CFLAGS = $(CDEBUGFLAGS) $(DEFINES) $(INCLUDES) $(XINCS)
all: xarchie
xarchie: $(OBJS) $(FCHOOSER_DEPS) $(MULTILIST_DEP)
$(RM) $@
$(CC) -o $@ $(OBJS) $(LIBS)
install: xarchie
$(INSTALL) $(INSTPGMFLAGS) xarchie $(BINDIR)/xarchie
$(INSTALL) $(INSTAPPFLAGS) Xarchie.ad $(XAPPLOADDIR)/Xarchie
install.man:
$(INSTALL) $(INSTMANFLAGS) xarchie.man $(MANDIR)/xarchie.$(MANSUFFIX)
clean::
$(RM) xarchie
$(RM) $(OBJS)
$(POBJS):
$(CC) -c $(CFLAGS) $(PDEBUG) $*.c
MAKECMD = $(MAKE) 'CC=$(CC)' 'CDEBUGFLAGS=$(CDEBUGFLAGS)' 'XINCS=$(XINCS)'
# Remove this if you're not using MultiList (see above)
$(MULTILIST_DEP):
(cd $(MULTILIST_DIR); $(MAKECMD))
clean::
cd $(MULTILIST_DIR); $(MAKE) clean
# Remove these if you're not using FileChooser (see above)
$(FCHOOSER_DEP):
(cd $(FCHOOSER_DIR); $(MAKECMD) 'INCLUDES=-I. -I../Dir')
clean::
cd $(FCHOOSER_DIR); $(MAKE) clean
$(DIR_DEP):
(cd $(DIR_DIR); $(MAKECMD))
clean::
cd $(DIR_DIR); $(MAKE) clean
#
# Make C code for fallback resources from application resource file
#
Xarchie.ad.h: Xarchie.ad
$(AD2C) Xarchie.ad >Xarchie.ad.h
#
# Make Help text from manpage
#
help-text1.h: xarchie.man
help-text1.sh >help-text1.h
help-text2.h: help-text1.h
help-text2.sh <help-text1.h >help-text2.h
#
# Install the "fallback" Makefiles in all the subdirs
#
Makefiles:
@for d in $(MULTILIST_DIR) $(FCHOOSER_DIR) $(DIR_DIR); do \
if test -f $$d/Makefile; then \
echo "mv $$d/Makefile $$d/Makefile.bak"; \
mv $$d/Makefile $$d/Makefile.bak; \
fi; \
echo "cp $$d/Makefile.dst $$d/Makefile"; \
cp $$d/Makefile.dst $$d/Makefile; \
done